﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Manage/MasterPage.master" AutoEventWireup="true" CodeFile="WishNote_List.aspx.cs" Inherits="Manage_WishNote_List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script type="text/javascript">
    function checkall(checkbox) {
        var $cb = jQuery('[id$=GridView1]').find('input');
        $cb.each(function () {
            $(this).attr("checked", checkbox.checked);
        });
        //          .find('input[@type=checkbox]')
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <asp:GridView ID="GridView1" runat="server" Width="805px" CellPadding="4" AutoGenerateColumns="False"  style=" margin-left:10px; margin-top:10px;"
        EnableModelValidation="True" ForeColor="#333333" GridLines="None" OnRowDeleting="GridView1_RowDeleting">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText="ID"  ItemStyle-Width ="50px" >
              <ItemTemplate>
                  <asp:CheckBox ID="CheckBox1" runat="server" />
                 <asp:Label ID="id" runat="server" Text='<%#Eval("id")%>'></asp:Label>
              </ItemTemplate>
              <ItemStyle Width="50px"></ItemStyle>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="许愿人" ItemStyle-Width ="150px" ItemStyle-HorizontalAlign="Center">
              <ItemTemplate>
                      <%#Eval("qname")%>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="对谁许愿" ItemStyle-Width ="150px" ItemStyle-HorizontalAlign="Center">
              <ItemTemplate>
                 <%#Eval("qtname")%>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="许愿时间"  ItemStyle-HorizontalAlign="Center">
              <ItemTemplate>
                 <%#Eval("qdate")%>
              </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center">
               <ItemTemplate>
                   <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#"WishNote_Mode.aspx?id="+ Eval("id")%>'>编辑</asp:HyperLink> 
                   &nbsp;&nbsp;
                    <asp:LinkButton ID="del" runat="server" CommandName="Delete" OnClientClick="javascript:return confirm('您确信要删除吗!?')">删除</asp:LinkButton>
               </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    </asp:GridView>
         <span style=" margin-left:50px; margin-top:20px; display:block;">
             <asp:LinkButton ID="toone" runat="server"  OnClick="toone_Click">[首页]</asp:LinkButton>          
             <asp:LinkButton ID="toup" runat="server" OnClick="toup_Click">[上一页]</asp:LinkButton>&nbsp;
             <asp:LinkButton ID="tonext" runat="server"  OnClick="tonext_Click">[下一页]</asp:LinkButton>
             <asp:LinkButton ID="tolast" runat="server" OnClick="tolast_Click">[尾页]</asp:LinkButton>&nbsp;
             [跳转到第
             <asp:DropDownList ID="jumppage" runat="server" 
                onselectedindexchanged="jumppage_SelectedIndexChanged" AutoPostBack="true" 
                 style=" height:20px; margin-left:3px; margin-bottom:-3px;">
             </asp:DropDownList>页]&nbsp;&nbsp;
              [页次:<asp:Label ID="curpage" runat="server" ForeColor="red"></asp:Label> / <asp:Label ID="sumpage" runat="server" Text="Label"></asp:Label>页] 
              [共<asp:Label ID="pagesum" runat="server" Text="Label" ForeColor="red"></asp:Label>项 
             <asp:Label ID="tpagesizes" runat="server" Text="Label" ForeColor="red"></asp:Label>项/页]
             <span style=" margin-left:30px;">
                 全选
                 <input id="Checkbox1" type="checkbox" onclick="checkall(this)"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                 <asp:LinkButton ID="delall" runat="server" onclick="delall_Click" OnClientClick="javascript:return confirm('您确信要删除吗!?')">
                    <img src="images/false.gif" alt="" style=" margin-bottom:-3px;"/>
                    删除选择项
                 </asp:LinkButton>
             </span>
         </span>
</asp:Content>

